package cn.niit.letuseatdemo.entity.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;


@Data
@Accessors(chain = true)
public class Rating extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评论id */
    @Id
    private Integer ratingId;

    /** 用户id */
    private Long userId;

    /** 店铺id */
    private Long storeId;

    /** 订单id */
    private Long orderId;

    /** 商品id */
    private Long goodsId;

    /** 评分 */
    private Long ratingCode;

    /** 评论内容 */
    private String ratingCom;

    /** 评论图片 */
    private String ratingIcon;

    /** 用户昵称 */
    private String userName;

    /** 评论日期
 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ratingDate;

    /** 逻辑删除标志*/
    private Integer del_flag;

    /** 创建人id */
    private Integer create_user_id;

    /** 创建人姓名 */
    private  String create_user_name;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date gmt_create;

    private Integer update_user_id;

    private String update_user_name;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private  Date gmt_update;

    @Override
    public String toString() {
        return "Rating{" +
                "ratingId=" + ratingId +
                ", userId=" + userId +
                ", storeId=" + storeId +
                ", orderId=" + orderId +
                ", goodsId=" + goodsId +
                ", ratingCode=" + ratingCode +
                ", ratingCom='" + ratingCom + '\'' +
                ", ratingIcon='" + ratingIcon + '\'' +
                ", userName='" + userName + '\'' +
                ", ratingDate=" + ratingDate +
                ", del_flag=" + del_flag +
                ", create_user_id=" + create_user_id +
                ", create_user_name='" + create_user_name + '\'' +
                ", gmt_create=" + gmt_create +
                ", update_user_id=" + update_user_id +
                ", update_user_name='" + update_user_name + '\'' +
                ", gmt_update=" + gmt_update +
                '}';
    }

        public Rating() {
         }


}
